

package com.hazelcast.config;

/**
 * Interface for recognizing a declarative Hazelcast configuration
 * based on the rules defined in the actual implementation.
 * The main use case for this interface is recognizing whether a given
 * declarative configuration is a member or a client configuration.
 */
public interface ConfigRecognizer {
    /**
     * Recognizes the configuration given in the {@code configStream}
     * argument.
     *
     * @param configStream The stream with the declarative configuration
     * @return {@code true} if the configuration is recognized, {@code false}
     * otherwise
     * @throws Exception If any error occurs during the recognition
     */
    boolean isRecognized(ConfigStream configStream) throws Exception;
}
